package com.lrkj.payfee.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lrkj.payfee.mapper.FavouredConfMapper;
import com.lrkj.payfee.domain.FavouredConf;
import com.lrkj.payfee.service.IFavouredConfService;

/**
 * 优惠政策设置Service业务层处理
 *
 * @author yajun_ren
 * @date 2021-08-14
 */
@Service
public class FavouredConfServiceImpl implements IFavouredConfService
{
    @Autowired
    private FavouredConfMapper favouredConfMapper;

    /**
     * 查询优惠政策设置
     *
     * @param favouredConfId 优惠政策设置ID
     * @return 优惠政策设置
     */
    @Override
    public FavouredConf selectFavouredConfById(String favouredConfId)
    {
        return favouredConfMapper.selectFavouredConfById(favouredConfId);
    }

    /**
     * 查询优惠政策设置列表
     *
     * @param favouredConf 优惠政策设置
     * @return 优惠政策设置
     */
    @Override
    public List<FavouredConf> selectFavouredConfList(FavouredConf favouredConf)
    {
        return favouredConfMapper.selectFavouredConfList(favouredConf);
    }

    /**
     * 新增优惠政策设置
     *
     * @param favouredConf 优惠政策设置
     * @return 结果
     */
    @Override
    public int insertFavouredConf(FavouredConf favouredConf)
    {
        return favouredConfMapper.insertFavouredConf(favouredConf);
    }

    /**
     * 修改优惠政策设置
     *
     * @param favouredConf 优惠政策设置
     * @return 结果
     */
    @Override
    public int updateFavouredConf(FavouredConf favouredConf)
    {
        return favouredConfMapper.updateFavouredConf(favouredConf);
    }

    /**
     * 批量删除优惠政策设置
     *
     * @param favouredConfIds 需要删除的优惠政策设置ID
     * @return 结果
     */
    @Override
    public int deleteFavouredConfByIds(String[] favouredConfIds)
    {
        return favouredConfMapper.deleteFavouredConfByIds(favouredConfIds);
    }

    /**
     * 删除优惠政策设置信息
     *
     * @param favouredConfId 优惠政策设置ID
     * @return 结果
     */
    @Override
    public int deleteFavouredConfById(String favouredConfId)
    {
        return favouredConfMapper.deleteFavouredConfById(favouredConfId);
    }

    @Override
    public int doSaveList(List<FavouredConf> batchBean) {
        return favouredConfMapper.doSaveList(batchBean);
    }

    @Override
    public int deleteFavouredPolicyId(String favouredPolicyId) {
        return favouredConfMapper.deleteFavouredPolicyId(favouredPolicyId);
    }
}
